﻿using System.Collections.Generic;
using System.Reflection;
using MetaSharp.Transformation.Patterns;

namespace MetaSharp.Transformation
{
    public interface IScope
    {
        IStream Stream { get; }
        ImmutableStack<RuleEntry> RuleStack { get; }
        Map<string, object> Variables { get; }
        MemoTable Memos { get; }

        IScope PushRule(PatternMatch rule, RulePattern origin);
        IScope PopRule(IMatch match);
        IScope AddVariable(string name, object value);
        IScope AddVariables(Map<string, object> variables);
        IScope SetStream(IStream stream);
        IScope SetVariables(Map<string, object> varialbes);
        IScope SetMemo(IMatch match, IStream start, IStream end, PatternMatch pattern, RulePattern origin);
        IScope SetMemos(MemoTable memos);
    }
}
